/*
 * Copyright (C) 2012 mAPPn.Inc
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.mol.market.demo.widget;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.mol.market.R;

/**
 * 实现了横向排列的Tab
 * @author Chaos	
 * @Description Wrapper
 * @date 2012-12-18 
 */
public abstract class TabFragmentWrapper extends AbsTabFragment{
    
    private String mTabTag; 
    
    @Override
    protected View initLayout(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
        return getCommonTab(inflater, container, savedInstanceState);
    }
    
    protected View getCommonTab(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState){
        return inflater.inflate(R.layout.common_tab_fragment, null);
    }

    @Override
    protected int getContentViewId() {
        return R.id.tabrealcontent;
    }

    @Override
    public void onTabChanged(String tabId) {
        mTabTag = tabId;
    }
    
    public String getTabTag(){
        return mTabTag;
    }
    
    @Override
    protected void dealloc() {
        mTabTag = null;
        super.dealloc();
    }

}
